package wiki.generic.concretecontents;

import java.util.List;

import wiki.generic.contents.Content;
import wiki.generic.med.ViewingService;
/**
 * 
 * @author <p><strong>JwTeam</strong></p> 
 *
 */
public class Text extends ConcreteContent{

	private ViewingService ps;
	
	
	public Text(String nome,String type, int ID, List<String> attributes, ViewingService ps) {
		super(nome,type, ID, attributes);
		this.ps=ps;
	}

	@Override
	public String getHTMLCode() {
		
		String code="<"+type+" style='";
		for (int i = 0; i < attributes.size(); i++) {
			code+=attributes.get(i)+"; ";
		}
		code+="' >"+ps.getContentMainParameterbyID(type, ID).getInfo()+"</"+type+">";
		
		return code;
	}
	
	public Content clone(){
	return new Text(nome,type, ID, attributes,ps);	
	}
}
